fix(frontend): vis forståelige feilmeldinger når spill ikke kan hentes (#206) #245
+6
−5
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Forsiden, listesiden og detaljsiden viste Apollos tekniske feilmelding rett til brukeren når spill ikke kunne hentes, f.eks. «Failed to fetch» eller «Response not successful: Received status code 500».
Nå bruker de samme
errorMessage()-hjelper som skjemaene allerede bruker. Feil med server eller nettverk gir «Fikk ikke kontakt med serveren. Prøv igjen om litt.» Meldinger backend skriver selv (BAD_USER_INPUT,UNAUTHENTICATED) vises som før.Endrede filer:
frontend/src/pages/Home/Home.tsxfrontend/src/pages/ListPage/ListPage.tsxfrontend/src/pages/GameDetail/GameDetail.tsxRelated Issue
Liste over relaterte issues som er med i denne PR.
Includes: #206
Closes: #206
Changes made
Checklist